package edu.sctu.practice.class02.xuejiahua.test04;

/**
 * Created by Administrator on 2015/10/10.
 */
public class Number {
    private int n1;
    private int n2;

    public Number(int n1,int n2) {
        this.n1 = n1;
        this.n2 = n2;
    }

    public int addition(){
        return (n1+n2);

    }
    public int subtration(){
        return (n1-n2);

    }
    public int multiplication(){
        return (n1*n2);

    }
    public double division(){
        if(n2!=0){
           return (n1/n2);
        }else {
            System.out.println("输入错误n2不能为0");

        }
        return (n1/n2);
    }





}


